<nz-table #basicTable 
  [nzData]="_formArrayControl.value" [formGroup]="form"
  [nzScroll]="{ x:  scrollX, y: record.options.scrollY}"
  [nzShowPagination]="false"
  [nzFrontPagination]="false">
  <thead>
    <tr>
      <th *ngFor="let item of _columns" 
      [nzWidth]="item.width"
      [nzAlign]="item.align"
      [nzRight]="item.fixed == 'right'"
    >{{item.title}}</th>
      <!-- <th>操作</th> -->
    </tr>
  </thead>
  <tbody  [formArrayName]="record.key">
    <!-- TODO ngFor using basicTable.data -->
    <tr *ngFor="let data of getAsAny(_formArrayControl.controls); let index = index" [formGroup]="data">
      <td *ngFor="let recordItem of _columns" [nzRight]="recordItem.dataIndex == 'dynamic-opr-button'">
        <ng-container *ngIf="recordItem.dataIndex == 'sequence_index_number'">
          <div class="center-icon">{{index+1}}</div>
        </ng-container>
        <div *ngIf="recordItem.dataIndex == 'dynamic-opr-button'" class="center-icon">
          <i nz-icon *ngIf="!isDisabled"
            nzType="minus-circle" nzTheme="outline"
            (click)="removeDomain(index)"></i>
            <!-- <i nz-icon nzType="plus-circle" *ngIf="index == _formArrayControl.controls.length - 1" nzTheme="outline"
            (click)="add()"></i> -->
        </div>
        <ng-container *ngIf="recordItem.dataIndex !== 'dynamic-opr-button' 
        && recordItem.dataIndex !== 'sequence_index_number'">
        <app-design-form-batch-model 
            [formConfig]="formConfig"
            [record]="recordItem.item"
            [form]="data"
            (previewOutput)="previewOutput.emit($event)"
          ></app-design-form-batch-model>
        </ng-container>
      </td>
    </tr>
  </tbody>
</nz-table>
<div class="button-bottom" [class.right]="config?.tableAddButtonRight">
  <button nz-button nzType="dashed" [disabled]="isDisabled" (click)="add()"><i nz-icon nzType="plus"></i>添加</button>
</div>